package com.kedou.sdk.params;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;
import com.kedou.sdk.params.bean.SimpleUserInfo;

import java.util.ArrayList;

/**
 * Created by Administrator on 2017/6/6 0006.
 */
public class AccountInfosTokenResponseParams extends ResponseParams<AccountInfosTokenResponseParams.AccountInfosResponseData> {

    public AccountInfosTokenResponseParams() {

    }

    protected AccountInfosTokenResponseParams(Parcel in) {
        super(in);
    }

    public static class AccountInfosResponseData implements Parcelable {

        public static final Creator<AccountInfosResponseData> CREATOR = new Creator<AccountInfosResponseData>() {
            @Override
            public AccountInfosResponseData createFromParcel(Parcel source) {
                return new AccountInfosResponseData(source);
            }

            @Override
            public AccountInfosResponseData[] newArray(int size) {
                return new AccountInfosResponseData[size];
            }
        };
        private String access_token;
        private String refresh_token;
        private String phone;
        @SerializedName("game_user")
        private ArrayList<SimpleUserInfo> userInfoList;
        private SimpleUserInfo box_user;


        public String getAccess_token() {
            return access_token;
        }

        public void setAccess_token(String access_token) {
            this.access_token = access_token;
        }

        public String getRefresh_token() {
            return refresh_token;
        }

        public void setRefresh_token(String refresh_token) {
            this.refresh_token = refresh_token;
        }

        public SimpleUserInfo getBox_user() {
            return box_user;
        }

        public void setBox_user(SimpleUserInfo box_user) {
            this.box_user = box_user;
        }

        public AccountInfosResponseData() {
        }

        protected AccountInfosResponseData(Parcel in) {
            this.phone = in.readString();
            this.userInfoList = in.createTypedArrayList(SimpleUserInfo.CREATOR);
            this.box_user = in.readParcelable(SimpleUserInfo.class.getClassLoader());
            this.access_token = in.readString();
            this.refresh_token = in.readString();
        }

        public String getPhone() {
            return phone;
        }

        public void setPhone(String phone) {
            this.phone = phone;
        }

        public ArrayList<SimpleUserInfo> getUserInfoList() {
            return userInfoList;
        }

        public void setUserInfoList(ArrayList<SimpleUserInfo> userInfoList) {
            this.userInfoList = userInfoList;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.phone);
            dest.writeTypedList(this.userInfoList);
            dest.writeParcelable(this.box_user, flags);
            dest.writeString(this.access_token);
            dest.writeString(this.refresh_token);
        }
    }
}
